<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
<style type="text/css">

	table#memberDetail{width:600px; color:#5D5D5D; font-size:12px; text-align:center; border-top:1px solid #575757;border-bottom:1px solid #575757}
	table#memberDetail a{text-decoration:none; color:#CDA9A9;}
	table#memberDetail a:hover{text-decoration:underline; color:#892525;}
	table#memberDetail th{background:#FFFF24; padding:8px 0; border-right:1px solid #7B7B7B; border-bottom:1px dashed #EAEAEA }
	table#memberDetail td{padding:10px 0 10px 0; background:#FFFFF6;border-bottom:1px dashed #EAEAEA}
	table#memberDetail tr.gry td{background:#000000;}
	table#memberDetail tr.last td{border-right:1px;}
</style>  

<script type="text/javascript">
	function tdBgChanger(){
		var trs = document.getElementById('memberDetail').getElementsByTagName('tr');
		var finalNum = Number(trs.length - 1);
		for(var j=0;j<trs.length;j++){
			
			if(j%2 == 0){
				trs[j].className = 'gry';
				if(j == finalNum){
					trs[j].className = 'gry last';
				}
			}else{
				if(j == finalNum){
					trs[j].className = 'last';
				}
			}
		}
	}
</script>     
    
    
<img src="${initParam.root}/img/member_detail_top.gif"><br><br>    
    
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
	$(function(){
		$("#userLevel").click(function(){
			if(confirm("사용자권한을 수정하시겠습니까?")){
				var userLevelValue=$("#userLevelValue").val();
				location.href="admin.do?command=updateUserLevel&id=${requestScope.mvo.id}&userLevel="+userLevelValue;
			}
		});
		$("#removeMember").click(function(){
			if(confirm("현 사용자를 떠나보내시겠습니까?")){
				location.href="wedding.do?command=deleteMember&id=${requestScope.mvo.id}";
				//location.href="admin.do?command=removeMember&id=${requestScope.mvo.id}";
			}
		});
	});
</script>
<table id="memberDetail" cellpadding="0" cellspacing="0" align="center">
<tr>
<th>아이디</th><td>${requestScope.mvo.id}</td>
</tr>
<tr>
<th>비밀번호</th><td>${requestScope.mvo.password}</td>
</tr>
<tr>
<th>이름</th><td>${requestScope.mvo.name}</td>
</tr>
<tr>
<th>전화번호</th><td>${requestScope.mvo.tel}</td>
</tr>
<tr>
<th>e-mail</th><td>${requestScope.mvo.email}</td>
</tr>
<tr>
<th>주소</th><td>${requestScope.mvo.address}</td>
</tr>
<tr>
<th>비밀번호찾기힌트</th><td>${requestScope.mvo.hint}</td>
</tr>
<tr>
<th>대답</th><td>${requestScope.mvo.answer}</td>
</tr>
<tr>
<th>성별</th><td>${requestScope.mvo.gender}</td>
</tr>
<tr>
<th>사용자권한</th><td><input type="text" size="3" value="${requestScope.mvo.userLevel}" id="userLevelValue">0:관리자 1:일반</td>
</tr>
</table>
<br>

<form align="center">
<img src="${initParam.root}/img/update_btn.gif" id="userLevel">&nbsp;
<img src="${initParam.root}/img/delete_btn.gif" id="removeMember">
</form>

